﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=emulateIE7" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta charset="utf-8">
<link rel="stylesheet" href="../../css/sapar.css" />
<link href="/statics/umeditor/themes/default/css/umeditor.min.css" type="text/css" rel="stylesheet">
<link rel="stylesheet" href="/statics/layui/css/layui.css" media="all">
<script src="/statics/layui/layui.js"></script>
<script type="text/javascript" src="../../js/jquery/jquery.js"></script>
<script type="text/javascript" src="../../js/sapar.js"></script>
<script type="text/javascript" src="../../js/jquery/jquery.cookie.js"></script>
<script type="text/javascript" src="../../js/jquery/jquery.dialog.js"></script>
<script type="text/javascript" src="../../js/bootstrap/bootstrap-table.js"></script>
<script type="text/javascript" src="../../js/jquery/jquery.pagination.js"></script>
<script type="text/javascript" src="../../js/config.js"></script>
<script type="text/javascript" src="../../js/utils.js"></script>
<script type="text/javascript" src="../../js/WdatePicker.js"></script>
<script type="text/javascript" src="js/advert_add.js"></script>
<style>
    .kv-item {
        margin: 10px 0;
        float: left;
        font-size: 14px;
    }
    .kv-item label{
        padding-left:40px;
    }
    .table-box{
        overflow: auto;
    }
    .table tbody tr td {
        white-space: normal;
    }
    .foot-botton{
        text-align: center;
    }
    .foot-btn {
        padding: 8px 20px;
        text-align: center;
        border-radius: 2px;
        font-size: 14px;
        height: 31px;
        line-height: 31px;
        border: 1px solid #6AB96E;
        text-decoration: none;
        color: #FFF;
        background: none repeat scroll 0% 0% #6AB96E;
    }
    .foot-btn:hover {
        color: #FFF;
        text-decoration: none;
    }
    #btnClose{
        margin-left: 20px;
        border: 1px solid #cccccc;
        background: none repeat scroll 0% 0% #cccccc;
    }
    .tab-container{
        height: 440px;
    }
    #tbDescription{
        width: 640px;
        height: 140px;
    }
    a {
        color: #337ab7;
        text-decoration: none;
    }
    a {
        text-decoration: none;
        cursor: pointer;
    }
</style>
<title>广告添加/修改</title>
</head>
<body style="overflow:auto;">
    <div id="saper-container">
        <div id="saper-bd">
            <div class="subfiled-content">
                <div class="tab-container" data-trigger="click">
                    <div class="tab">
                        <a href="javascript:;" class="current">基本信息</a>
                        <a href="javascript:;">广告图片</a>
                        <a href="javascript:;">广告内容</a>
                    </div>
                    <div class="tab-content" id="tbForm">
                        <div class="tab-content-item" style="display: block;">
                            <div class="kv-item clearfix">
                                <label>广告名称：</label>
                                <div class="kv-item-content">
                                    <input id="tbName" type="text" placeholder="广告名称" field="title" required="required" /><span class="impInfo">*</span>
                                </div>
                            </div>
                            <div class="kv-item clearfix">
                                <label>显示顺序：</label>
                                <div class="kv-item-content">
                                    <input id="tbShowOrder" field="showOrder" type="text" value="0" required="required" /><span class="impInfo">*</span>
                                </div>
                            </div>
                            <div class="kv-item clearfix">
                                <label>当前状态：</label>
                                <div class="kv-item-content">
                                    <select id="tbStatus" field="status" required="required"></select><span class="impInfo">*</span>
                                </div>
                            </div>
                            <div class="kv-item clearfix">
                                <label>广告位置：</label>
                                <div class="kv-item-content">
                                    <select id="tbLocation" field="location" required="required"></select><span class="impInfo">*</span>
                                </div>
                            </div>
                            <div class="kv-item clearfix">
                                <label>开始时间：</label>
                                <div class="kv-item-content">
                                    <input id="tbStartTime" field="startTime" format="date" required="required" type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" placeholder="开始时间" /><span class="impInfo">*</span>
                                </div>
                            </div>
                            <div class="kv-item clearfix">
                                <label>结束时间：</label>
                                <div class="kv-item-content">
                                    <input id="tbEndTime" field="endTime" format="date" required="required" type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" placeholder="结束时间" /><span class="impInfo">*</span>
                                </div>
                            </div>
                            <div class="kv-item clearfix">
                                <label>链接方式：</label>
                                <div class="kv-item-content">
                                    <select id="tbLinkType" field="linkType" required="required" onchange="javascript:AdvertAdd.changeLinkType();"></select><span class="impInfo">*</span>
                                </div>
                            </div>
                            <div class="kv-item clearfix" id="divLink">
                                <label>链接地址：</label>
                                <div class="kv-item-content">
                                    <input id="tbLink" field="linkUrl" type="text" placeholder="链接地址" />
                                </div>
                            </div>
                            <div class="kv-item clearfix"  id="divProject">
                                <label>选择项目：</label>
                                <div class="kv-item-content">
                                    <select id="tbProjectId" field="linkProject">
                                    </select>
                                </div>
                            </div>
                            <div class="kv-item clearfix">
                                <label>广告描述：</label>
                                <div class="kv-item-content">
                                    <textarea id="tbDescription" placeholder="广告描述" field="description"></textarea>                              
                                </div>
                            </div>
                        </div>
                        <div class="tab-content-item" style="display: block;">
                            <div class="kv-item clearfix">
                                <label>广告图片：</label>
                                <div class="kv-item-content">
                                    <button type="button" class="layui-btn" id="uploadImage">
                                        <i class="layui-icon">&#xe67c;</i>上传图片
                                    </button>
                                    <br /><br />
                                    <img id="imageView" style="width:400px; height:200px;" />
                                    <input id="tbImage" type="hidden" field="image" />
                                </div>
                            </div>
                        </div>
                        <div class="tab-content-item" style="display: none;">
                            <div class="table" style="overflow:auto">
                                <!-- 加载编辑器的容器 -->
                                <script id="container" name="content" type="text/plain"></script>
                                <script src="/statics/umeditor/third-party/template.min.js"></script>                            
                                <!-- 配置文件 -->
                                <script type="text/javascript" src="/statics/umeditor/umeditor.config.js"></script>
                                <!-- 编辑器源码文件 -->
                                <script type="text/javascript" src="/statics/umeditor/umeditor.js"></script>
                                <script type="text/javascript" src="/statics/umeditor/lang/zh-cn/zh-cn.js"></script>                            
                                <!-- 实例化编辑器 -->
                                <script type="text/javascript">
                                    var um = UM.getEditor('container', {
                                        autoHeightEnabled: false,
                                        initialFrameWidth:780,
                                        initialFrameHeight:310
                                    });
                                </script>
                            </div>                            
                        </div>
                    </div>
                </div>
                <div class="foot-botton">
                    <a id="btnSave" href="javascript:;" class="foot-btn">保存</a>
                    <a id="btnClose" href="javascript:;" class="foot-btn">取消</a>
                </div>
            </div>
        </div>
        <div id="saper-ft"></div>
    </div>
</body>

<script type="text/javascript">
    // $('select').iSelect();
   
</script>
</html>